Code
library(googlesheets4)
library(tidyverse)
library(broom)
library(ggplot2)Introducción
La medición de parámetros foliares, como el área y la longitud, es fundamental en estudios fisiológicos, ecofisiológicos, agronómicos y de modelamiento de crecimiento vegetal. Las hojas representan el principal órgano fotosintético y su tamaño permite estimar biomasa, eficiencia hídrica, productividad y estado nutricional.
Existen diferentes herramientas para medir hojas, entre ellas ImageJ y QGIS, ambas ampliamente utilizadas en investigación científica por su precisión y facilidad de uso:
El presente análisis compara los valores obtenidos en 25 hojas de Physalis peruviana (aguaymanto) utilizando ambos programas.
Comparar la precisión y concordancia de las mediciones de área y longitud de hojas de aguaymanto realizadas en ImageJ y QGIS.
El área y longitud de la hoja permiten:
La medición digital ha reemplazado métodos manuales debido a su precisión, rapidez y capacidad para procesar grandes cantidades de muestras.
| Característica | ImageJ | QGIS |
|---|---|---|
| Tipo de software | Análisis de imágenes | Sistema de información geográfica |
| Precisión | Alta en 2D | Muy alta, calibrado espacialmente |
| Facilidad de uso | Muy sencilla | Requiere pasos adicionales |
| Formato de entrada | JPG, PNG, TIFF | Raster o georreferenciado |
| Aplicación común | Laboratorio | Cartografía, fotogrametría, morfometría |
| Ideal para | Hojas individuales | Polígonos complejos, mapas, colecciones grandes |
Ambos programas pueden medir área y longitud con precisión comparable, pero la metodología varía.
Se utilizaron 25 hojas representativas de Physalis peruviana (aguaymanto), recolectadas de plantas sanas.
#librerias
library(googlesheets4)
library(tidyverse)
library(broom)
library(ggplot2)source('https://inkaverse.com/setup.r')Project directory: C:/Users/LENOVO/Desktop/SHIRLEI MILAGROS NEYRA ALARCON UNTRM/CICLO 2025 - 2/PROGRAMACIÓN DE DATOS/github_documents/padwp
CPU cores detected: 4
CPU cores in use: 3
─ Session info ───────────────────────────────────────────────────────────────
setting value
version R version 4.5.2 (2025-10-31 ucrt)
os Windows 11 x64 (build 26100)
system x86_64, mingw32
ui RTerm
language (EN)
collate Spanish_Peru.utf8
ctype Spanish_Peru.utf8
tz America/Lima
date 2025-12-10
pandoc 3.6.3 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)
quarto NA @ C:\\PROGRA~1\\RStudio\\RESOUR~1\\app\\bin\\quarto\\bin\\quarto.exe
─ Packages ───────────────────────────────────────────────────────────────────
package * version date (UTC) lib source
abind 1.4-8 2024-09-12 [1] CRAN (R 4.5.0)
agricolae 1.3-7 2023-10-22 [1] CRAN (R 4.5.1)
AlgDesign 1.2.1.2 2025-04-06 [1] CRAN (R 4.5.0)
askpass 1.2.1 2024-10-04 [1] CRAN (R 4.5.1)
backports 1.5.0 2024-05-23 [1] CRAN (R 4.5.0)
boot 1.3-32 2025-08-29 [1] CRAN (R 4.5.1)
broom * 1.0.9 2025-07-28 [1] CRAN (R 4.5.1)
cachem 1.1.0 2024-05-16 [1] CRAN (R 4.5.1)
car * 3.1-3 2024-09-27 [1] CRAN (R 4.5.1)
carData * 3.0-5 2022-01-06 [1] CRAN (R 4.5.1)
cellranger 1.1.0 2016-07-27 [1] CRAN (R 4.5.1)
cli 3.6.5 2025-04-23 [1] CRAN (R 4.5.1)
cluster 2.1.8.1 2025-03-12 [2] CRAN (R 4.5.2)
codetools 0.2-20 2024-03-31 [2] CRAN (R 4.5.2)
cowplot * 1.2.0 2025-07-07 [1] CRAN (R 4.5.1)
curl 7.0.0 2025-08-19 [1] CRAN (R 4.5.1)
devtools * 2.4.6 2025-10-03 [1] CRAN (R 4.5.2)
digest 0.6.37 2024-08-19 [1] CRAN (R 4.5.1)
dplyr * 1.1.4 2023-11-17 [1] CRAN (R 4.5.1)
DT 0.34.0 2025-09-02 [1] CRAN (R 4.5.1)
ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.5.2)
emmeans * 1.11.2-8 2025-08-27 [1] CRAN (R 4.5.1)
estimability 1.5.1 2024-05-12 [1] CRAN (R 4.5.1)
evaluate 1.0.5 2025-08-27 [1] CRAN (R 4.5.1)
FactoMineR * 2.12 2025-07-23 [1] CRAN (R 4.5.1)
farver 2.1.2 2024-05-13 [1] CRAN (R 4.5.1)
fastmap 1.2.0 2024-05-15 [1] CRAN (R 4.5.1)
flashClust 1.01-2 2012-08-21 [1] CRAN (R 4.5.0)
forcats * 1.0.0 2023-01-29 [1] CRAN (R 4.5.1)
Formula 1.2-5 2023-02-24 [1] CRAN (R 4.5.0)
fs 1.6.6 2025-04-12 [1] CRAN (R 4.5.1)
gargle 1.5.2 2023-07-20 [1] CRAN (R 4.5.1)
generics 0.1.4 2025-05-09 [1] CRAN (R 4.5.1)
ggplot2 * 4.0.0 2025-09-11 [1] CRAN (R 4.5.1)
ggrepel 0.9.6 2024-09-07 [1] CRAN (R 4.5.1)
glue 1.8.0 2024-09-30 [1] CRAN (R 4.5.1)
googledrive * 2.1.1 2023-06-11 [1] CRAN (R 4.5.1)
googlesheets4 * 1.1.1 2023-06-11 [1] CRAN (R 4.5.1)
gtable 0.3.6 2024-10-25 [1] CRAN (R 4.5.1)
hms 1.1.3 2023-03-21 [1] CRAN (R 4.5.1)
htmltools 0.5.8.1 2024-04-04 [1] CRAN (R 4.5.1)
htmlwidgets 1.6.4 2023-12-06 [1] CRAN (R 4.5.1)
httpuv 1.6.16 2025-04-16 [1] CRAN (R 4.5.1)
httr 1.4.7 2023-08-15 [1] CRAN (R 4.5.1)
huito * 0.2.6 2025-10-18 [1] CRAN (R 4.5.2)
inti * 0.6.9 2025-10-17 [1] CRAN (R 4.5.1)
jsonlite 2.0.0 2025-03-27 [1] CRAN (R 4.5.1)
knitr * 1.50 2025-03-16 [1] CRAN (R 4.5.1)
later 1.4.4 2025-08-27 [1] CRAN (R 4.5.1)
lattice 0.22-7 2025-04-02 [2] CRAN (R 4.5.2)
leaps 3.2 2024-06-10 [1] CRAN (R 4.5.1)
lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.5.1)
lme4 * 1.1-37 2025-03-26 [1] CRAN (R 4.5.1)
lubridate * 1.9.4 2024-12-08 [1] CRAN (R 4.5.1)
magick * 2.9.0 2025-09-08 [1] CRAN (R 4.5.2)
magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.5.1)
MASS * 7.3-65 2025-02-28 [2] CRAN (R 4.5.2)
Matrix * 1.7-4 2025-08-28 [1] CRAN (R 4.5.2)
memoise 2.0.1 2021-11-26 [1] CRAN (R 4.5.1)
mime 0.13 2025-03-17 [1] CRAN (R 4.5.0)
minqa 1.2.8 2024-08-17 [1] CRAN (R 4.5.1)
mnormt 2.1.1 2022-09-26 [1] CRAN (R 4.5.2)
multcomp * 1.4-29 2025-10-20 [1] CRAN (R 4.5.1)
multcompView 0.1-10 2024-03-08 [1] CRAN (R 4.5.1)
mvtnorm * 1.3-3 2025-01-10 [1] CRAN (R 4.5.1)
nlme 3.1-168 2025-03-31 [2] CRAN (R 4.5.2)
nloptr 2.2.1 2025-03-17 [1] CRAN (R 4.5.1)
openssl 2.3.3 2025-05-26 [1] CRAN (R 4.5.1)
pillar 1.11.0 2025-07-04 [1] CRAN (R 4.5.1)
pkgbuild 1.4.8 2025-05-26 [1] CRAN (R 4.5.2)
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.5.1)
pkgload 1.4.1 2025-09-23 [1] CRAN (R 4.5.2)
promises 1.3.3 2025-05-29 [1] CRAN (R 4.5.1)
psych * 2.5.6 2025-06-23 [1] CRAN (R 4.5.2)
purrr * 1.1.0 2025-07-10 [1] CRAN (R 4.5.1)
R6 2.6.1 2025-02-15 [1] CRAN (R 4.5.1)
rappdirs 0.3.3 2021-01-31 [1] CRAN (R 4.5.1)
rbibutils 2.3 2024-10-04 [1] CRAN (R 4.5.1)
RColorBrewer 1.1-3 2022-04-03 [1] CRAN (R 4.5.0)
Rcpp 1.1.0 2025-07-02 [1] CRAN (R 4.5.1)
Rdpack 2.6.4 2025-04-09 [1] CRAN (R 4.5.1)
readr * 2.1.5 2024-01-10 [1] CRAN (R 4.5.1)
reformulas 0.4.1 2025-04-30 [1] CRAN (R 4.5.1)
remotes 2.5.0 2024-03-17 [1] CRAN (R 4.5.2)
RhpcBLASctl * 0.23-42 2023-02-11 [1] CRAN (R 4.5.2)
rlang 1.1.6 2025-04-11 [1] CRAN (R 4.5.1)
rmarkdown 2.29 2024-11-04 [1] CRAN (R 4.5.1)
rstudioapi 0.17.1 2024-10-22 [1] CRAN (R 4.5.1)
S7 0.2.0 2024-11-07 [1] CRAN (R 4.5.1)
sandwich 3.1-1 2024-09-15 [1] CRAN (R 4.5.1)
scales 1.4.0 2025-04-24 [1] CRAN (R 4.5.1)
scatterplot3d 0.3-44 2023-05-05 [1] CRAN (R 4.5.0)
sessioninfo * 1.2.3 2025-02-05 [1] CRAN (R 4.5.2)
shiny * 1.11.1 2025-07-03 [1] CRAN (R 4.5.1)
showtext 0.9-7 2024-03-02 [1] CRAN (R 4.5.2)
showtextdb 3.0 2020-06-04 [1] CRAN (R 4.5.2)
stringi 1.8.7 2025-03-27 [1] CRAN (R 4.5.0)
stringr * 1.5.1 2023-11-14 [1] CRAN (R 4.5.1)
survival * 3.8-3 2024-12-17 [2] CRAN (R 4.5.2)
sysfonts 0.8.9 2024-03-02 [1] CRAN (R 4.5.2)
TH.data * 1.1-4 2025-09-02 [1] CRAN (R 4.5.1)
tibble * 3.3.0 2025-06-08 [1] CRAN (R 4.5.1)
tidyr * 1.3.1 2024-01-24 [1] CRAN (R 4.5.1)
tidyselect 1.2.1 2024-03-11 [1] CRAN (R 4.5.1)
tidyverse * 2.0.0 2023-02-22 [1] CRAN (R 4.5.1)
timechange 0.3.0 2024-01-18 [1] CRAN (R 4.5.1)
tzdb 0.5.0 2025-03-15 [1] CRAN (R 4.5.1)
usethis * 3.2.1 2025-09-06 [1] CRAN (R 4.5.1)
vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.5.1)
withr 3.0.2 2024-10-28 [1] CRAN (R 4.5.1)
xfun 0.52 2025-04-02 [1] CRAN (R 4.5.1)
xtable 1.8-4 2019-04-21 [1] CRAN (R 4.5.1)
yaml 2.3.10 2024-07-26 [1] CRAN (R 4.5.0)
zoo 1.8-14 2025-04-10 [1] CRAN (R 4.5.1)
[1] C:/Users/LENOVO/AppData/Local/R/win-library/4.5
[2] C:/Program Files/R/R-4.5.2/library
* ── Packages attached to the search path.
──────────────────────────────────────────────────────────────────────────────
gs <- "https://docs.google.com/spreadsheets/d/1dw3DXonb-P-CMaU4YLGr3WGMPa2v87zcbyGut7a1rzM/edit?gid=0#gid=0" %>%
as_sheets_id()
fb <- gs %>%
range_read(ss = .,sheet = "fb - imageJ")
gs <- "https://docs.google.com/spreadsheets/d/1fvyd0ljOu7F_A8H_iY6ruDk6CQ0udKJqrN_CxlVGjMA/edit?gid=0#gid=0" %>%
as_sheets_id()
fb <- gs %>%
range_read(ss = .,sheet = "fb -qgis")#Resultados
#Regresion lineal de la HEIGHT
library(tidyverse)
library(googlesheets4)
# 1. Cargar datos ImageJ
img <- "https://docs.google.com/spreadsheets/d/1dw3DXonb-P-CMaU4YLGr3WGMPa2v87zcbyGut7a1rzM/edit?gid=0#gid=0" %>%
as_sheets_id() %>%
range_read(sheet = "fb - imageJ") %>%
mutate(
ID = as.character(ID),
HEIGHT = as.numeric(HEIGHT)
)
# 2. Cargar datos QGIS
qgs <- "https://docs.google.com/spreadsheets/d/1fvyd0ljOu7F_A8H_iY6ruDk6CQ0udKJqrN_CxlVGjMA/edit?gid=0#gid=0" %>%
as_sheets_id() %>%
range_read(sheet = "fb -qgis") %>%
mutate(
ID = as.character(ID),
HEIGHT = as.numeric(HEIGHT)
)
# 3. Unir por ID
df <- left_join(img, qgs, by = "ID", suffix = c("_ij", "_qgis"))
# 4. Gráfico de regresión
ggplot(df, aes(x = HEIGHT_ij, y = HEIGHT_qgis)) +
geom_point() +
geom_smooth(method = "lm", se = TRUE, color = "steelblue") +
labs(
x = "HEIGHT (ImageJ)",
y = "HEIGHT (QGIS)",
title = "Regresión lineal de HEIGHT: ImageJ vs QGIS"
) +
theme_minimal()#Regresion lineal del WIDTH
# datos ImageJ
library(tidyverse)
library(googlesheets4)
# 1. Cargar datos ImageJ
img <- "https://docs.google.com/spreadsheets/d/1dw3DXonb-P-CMaU4YLGr3WGMPa2v87zcbyGut7a1rzM/edit?gid=0#gid=0" %>%
as_sheets_id() %>%
range_read(sheet = "fb - imageJ") %>%
mutate(
ID = as.character(ID),
WIDTH = as.numeric(WIDTH)
)
# 2. Cargar datos QGIS
qgs <- "https://docs.google.com/spreadsheets/d/1fvyd0ljOu7F_A8H_iY6ruDk6CQ0udKJqrN_CxlVGjMA/edit?gid=0#gid=0" %>%
as_sheets_id() %>%
range_read(sheet = "fb -qgis") %>%
mutate(
ID = as.character(ID),
WIDTH = as.numeric(WIDTH)
)
# 3. Unir por ID
df <- left_join(img, qgs, by = "ID", suffix = c("_ij", "_qgis"))
# 4. Gráfico de regresión WIDTH
ggplot(df, aes(x = WIDTH_ij, y = WIDTH_qgis)) +
geom_point() +
geom_smooth(method = "lm", se = TRUE, color = "steelblue") +
labs(
x = "WIDTH (ImageJ)",
y = "WIDTH (QGIS)",
title = "Regresión lineal de WIDTH: ImageJ vs QGIS"
) +
theme_minimal()
library(tidyverse)
library(googlesheets4)
# 1. Cargar datos ImageJ
img <- "https://docs.google.com/spreadsheets/d/1dw3DXonb-P-CMaU4YLGr3WGMPa2v87zcbyGut7a1rzM/edit?gid=0#gid=0" %>%
as_sheets_id() %>%
range_read(sheet = "fb - imageJ") %>%
mutate(
ID = as.character(ID),
AREA = as.numeric(AREA)
)
# 2. Cargar datos QGIS
qgs <- "https://docs.google.com/spreadsheets/d/1fvyd0ljOu7F_A8H_iY6ruDk6CQ0udKJqrN_CxlVGjMA/edit?gid=0#gid=0" %>%
as_sheets_id() %>%
range_read(sheet = "fb -qgis") %>%
mutate(
ID = as.character(ID),
AREA = as.numeric(AREA)
)
# 3. Unir por ID
df <- left_join(img, qgs, by = "ID", suffix = c("_ij", "_qgis"))
# 4. Gráfico de regresión AREA
ggplot(df, aes(x = AREA_ij, y = AREA_qgis)) +
geom_point() +
geom_smooth(method = "lm", se = TRUE, color = "steelblue") +
labs(
x = "AREA (ImageJ)",
y = "AREA (QGIS)",
title = "Regresión lineal de AREA: ImageJ vs QGIS"
) +
theme_minimal()#Conclusiones
Las mediciones de longitud, ancho y área obtenidas con ImageJ y QGIS mostraron una alta concordancia, evidenciada por las regresiones lineales realizadas, lo cual demuestra que ambos programas son confiables y precisos para la caracterización morfométrica de hojas de aguaymanto.
Tanto ImageJ como QGIS cumplen adecuadamente con los objetivos del estudio, permitiendo medir de manera consistente las hojas; sin embargo, ImageJ destaca por su rapidez en mediciones simples, mientras que QGIS ofrece mayor precisión y flexibilidad en análisis de área y manejo espacial, complementándose según las necesidades de análisis.
```
Abramoff, M. D., Magalhães, P. J., & Ram, S. J. (2004). Image processing with ImageJ. Biophotonics International, 11(7), 36–42. ➡ Referencia clásica para usar ImageJ en mediciones morfológicas.
Schneider, C. A., Rasband, W. S., & Eliceiri, K. W. (2012). NIH Image to ImageJ: 25 years of image analysis. Nature Methods, 9(7), 671–675. ➡ Base teórica del software utilizado para medir longitud, ancho y área.
QGIS Development Team. (2024). QGIS Geographic Information System. Open Source Geospatial Foundation Project. ➡ Documentación oficial del software SIG usado en las mediciones de área.
Bivand, R. S., Pebesma, E., & Gómez-Rubio, V. (2013). Applied Spatial Data Analysis with R. Springer. ➡ Sustento teórico para análisis espacial y procesamiento de polígonos (como áreas en QGIS).
Wickham, H. (2016). ggplot2: Elegant Graphics for Data Analysis. Springer. ➡ Base teórica para los gráficos de regresión lineal utilizados en R.
Wickham, H., et al. (2019). Welcome to the tidyverse. Journal of Open Source Software, 4(43), 1686. ➡ Sustento para el uso de dplyr, readr, ggplot2 y manejo de datos en el análisis.
Allaire, J., Xie, Y., et al. (2022). Quarto: Reproducible Documents and Websites. ➡ Referencia oficial para la construcción del documento final en formato Quarto.
Pérez-Harguindeguy, N., et al. (2013). New handbook for standardised measurement of plant functional traits worldwide. Australian Journal of Botany, 61(3), 167–234. ➡ Sustento metodológico sobre medición de rasgos foliares (longitud, ancho, área de hojas).